-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Truncate errors at 256 characters, fix flaky test. #556
Conversation
0c649f6
to
c186bfc
Compare
Changes AnalysisCommit SHA: 6a0f9c4 API ChangesSummaryNO CHANGES ReportThe full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/10724577950/artifacts/1897365853 API Coverage
|
c186bfc
to
cf14a2a
Compare
Spec Test Coverage Analysis
|
6a91120
to
848e142
Compare
@@ -51,5 +63,8 @@ chapters: | |||
shard: 0 | |||
from_node: opensearch-node1 | |||
to_node: opensearch-node2 | |||
retry: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shard may be still relocating, retry.
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
848e142
to
6a0f9c4
Compare
@@ -152,8 +152,9 @@ export class ConsoleResultLogger implements ResultLogger { | |||
} | |||
|
|||
#maybe_shorten_error_message(message: string | undefined): string | undefined { | |||
if (message === undefined || message.length <= 128 || this._verbose) return message | |||
const part = message.split(',')[0] | |||
const cut_at = 256 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This is better off as a configurable number in the constructor, esp when we refactor the test framework to be a standalone product.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave it as is for now, but we can expose it as an option when someone actually wants to change this value programmatically.
Description
I was trying to debug #555 and couldn't reproduce it locally. I wish I saw the error in CI, but we're being too clever with truncation of the error message. Be less clever in this PR, which produces the follow output.
The relocation test is flaky because sometimes the shard is allocated on
opensearch-node-1
and sometimes on-2
.Three possible fixes:
movies
index is allocated, then relocate it to the other one. The problem is to know what this "other" node is in the test.index.routing.allocation.include.zone: zoneA
which would put the shard on node1, disabling rebalance, then removing that setting.node1
in a prologue and ignore errors.I chose (3) because it's simpler to think about.
Closes #555.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.